package StudentDemon;

import java.util.*;

public class draft {

    void  tyis()
    {
        System.out.println("你好啊的");
    }


    void res()
    {
        tyis();

    }


    public static void main(String[] args) {
        Collection col1 = new ArrayList();
        col1.add("a");
        col1.add("ad");
        col1.add("bc");
        System.out.println(col1);
        Iterator It1 = col1.iterator();
        while (It1.hasNext()) {
            String result = (String) It1.next();
            System.out.println(result);
        }
        List list=new ArrayList();
        list.add("c");
        list.add("sa");
        list.add("vvv");
        System.out.println(list);

        System.out.println( list.subList(0,1));
      /*  list.remove(2);
        list.remove("c");
        System.out.println(list);*/
        Collection set=new HashSet();
        set.add("xx");
        set.add("yy");
        set.add("xx");
        System.out.println(set);//Set唯一,所以输出只有一个xx



    }
}
